package com.alibaba.mapper;

import com.alibaba.model.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface ArticleMapper extends BaseMapper<Article> {

    @Update("UPDATE article SET view_count = view_count + #{viewCount} WHERE id = #{id}")
    void increaseViewCount(@Param("id") Long id, @Param("viewCount") Integer viewCount);
}
